<%@ page pageEncoding="UTF-8"%>
<script type="text/x-template" id="delete_tip">
    <div class="_delete-tip">
        <div class="_pop-container">
            <div class="_top">
                {{top}}
            </div>
            <div class="_bottom">
                <img class="_alert-img" src="/images/components/delete/ic-alert.png" alt="">
                <div class="_context">
                    <div class="_title">
                        {{title}}
                    </div>
                    <div class="_content">
                        {{content}}
                    </div>
                </div>
            </div>
            <div class="_footer">
                <div class="_sure _btn" @click="success()">确定</div>
                <div class="_cancel _btn" @click="cancel()">取消</div>
            </div>
        </div>
    </div>
</script>
<script>
	var deleteTip = {
		template: "#delete_tip",
        props: ["title", "content", "top", "arg"],
        methods: {
            cancel: function() {
                this.$dispatch("deleteCancel");
            },
            success: function() {
                this.arg();
                this.$dispatch("deleteCancel");
            }
        }
	}
</script>
<style>
    ._delete-tip {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        background: rgba(0, 0, 0, .4);
        z-index: 999;
        font-size: 18px;
    }
    ._delete-tip ._pop-container {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        margin: auto;
        width: 500px;
        transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
    }
    ._delete-tip ._top {
        background: #e6eaf5;
        color: #333;
        line-height: 80px;
        font-size: 20px;
        text-align: center;
    }
    ._delete-tip ._bottom {
        padding: 20px 0;
        background: #fff;
        text-align: center;
    }
    ._delete-tip ._alert-img {
        margin-right: 10px;
        width: 40px;
        vertical-align: text-bottom;
    }
    ._delete-tip ._title {
        margin-bottom: 5px;
        font-size: 20px;
        color: #333;
    }
    ._delete-tip ._content {
        font-size: 14px;
        color: #999;
    }
    ._delete-tip ._context {
        display: inline-block;
        vertical-align: top;
        max-width: 300px;
        font-size: 18px;
        text-align: left;
    }
    ._delete-tip ._footer {
        padding: 20px 0;
        background: #fff;
        text-align: center;
    }
    ._delete-tip ._btn {
        display: inline-block;
        margin: 0 20px;
        width: 100px;
        line-height: 36px;
        font-size: 18px;
        border-radius: 4px;
        text-align: center;
        cursor: pointer;
    }
    ._delete-tip ._sure {
        background: #3f8dfa;
        color: #fff;
        border: 1px solid #3f8dfa;
    }
    ._delete-tip ._cancel {
        color: #666;
        border: 1px solid #aaa;
    }
</style>
